package model;

import java.util.ArrayList;
import java.util.List;

import model.Articles;

public class Description {

protected List<Articles> articles;
	
	public Description()
	{
		this.articles = new ArrayList<Articles>();
	}
	
	public void addArticle(Articles art)
	{
		this.articles.add(art);
	}
	
	public boolean removeArticle(String title)
	{
		return (this.articles.remove(title) != false);
	}
	
	public String contentOf(Articles art)
	{
		int i = this.getArticles().indexOf(art);
		return this.articles.get(i).getContent();
	}
	
	public List<Articles> getArticles() {
		return articles;
	}

	public void setArticles(List<Articles> articles) {
		this.articles = articles;
	}

	public String toString()
	{
		return this.articles.toString();
	}
}
